
import java.math.BigDecimal;
import java.sql.*;


public class demo {
	  public static void main(String[] srg) {
		  testCMap2();
	  }
  public static void fun1() {
      String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";   //����JDBC����
       String dbURL = "jdbc:sqlserver://192.168.0.112:1433; DatabaseName=trade";   //���ӷ����������ݿ�test
      String userName = "sa";   //Ĭ���û���
      String userPwd = "123";   //����
      Connection dbConn;
      try {
          Class.forName(driverName);
          dbConn = DriverManager.getConnection(dbURL, userName, userPwd);
          System.out.println("Connection Successful!");   //������ӳɹ� ����̨���Connection Successful!
      } catch (Exception e) {
           e.printStackTrace();
      }
      
   }
	 public static void testCMap2() {
			CMapDbl cm = new CMapDbl();

			 cm.add(500.0,1.0);
			 cm.add(600.0,2.0);
			 cm.add(540.0,3.0);
			 cm.add(520.0,4.0);
			 cm.add(720.0,4.0);
			 cm.add(620.0,4.0);
			 cm.add(820.0,4.0);
			 cm.add(500.0,2.0);
			 Itestfun itf=new Itestfun() {
				public  void exec() {}
			 };
			 cm.foreach(itf);
			 cm.remove(620.0,4.0);
			 cm.remove(520.0,3.0);
			 cm.foreach(itf);
			 
				
		}

}
